<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="./inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="桌面" />
<%@ include file="./inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/MessageDialogQQ.js"></script>
<script language="javascript">
	function showBbsTopic(topicId,columnId){
		var defaultUrl="/bbs/BbsReplyList.ihtm?topic_id="+topicId+"&column_id="+columnId;
		var url="/bbs/Main.ihtm?default_id="+columnId+"&default_url="+encodeURIComponent(defaultUrl);
		showWin(1024,600,url);
	}
	function showMessageInfo(id){
		var defaultUrl="/message/MessageInfo.ihtm?id="+id;
		var url="/message/Main.ihtm?default_url="+encodeURIComponent(defaultUrl);
		showWin(1024,600,url);
	}
	function showComm(id){
		parent.setIframeDisplay("none");
		var url="/base/EstablishmentCommunicateEdit.ihtm?id="+id;
		parent.ShowIframe("日程",url,980,440,"refreshDesktopWin()");//refreshDesktopWin是父窗口的
	}
	function refreshWin(){
		window.location.reload(true);
	}
	function doCommNew(){
		parent.setIframeDisplay("none");
		var url="/base/EstablishmentCommunicateNew.ihtm?alert_type=NONE";
		parent.ShowIframe("日程",url,980,440,"refreshDesktopWin()");//refreshDesktopWin是父窗口的
	}
</script>
</head>
<body style="background:#EBFAFF;" scroll="no">
<div class="news-info">
	<br>
	<div class="news-info-main">
		<div class="title">
			<a href="javascript:showWin(1024,600,'/bbs/Main.ihtm');">更多...</a>
			<a href="javascript:refreshWin();"><img src="/images/refresh.gif" border="0"></a>
			<h3>公告<span style="font-weight:normal;font-size:12px;color:#777;" id="testSpan"> 最近一周</span></h3>
		</div>
		<MARQUEE scrollAmount=2 direction=up height=450 width="100%" ONMOUSEOUT="this.start();" ONMOUSEOVER="this.stop();">
		<ul>
			<c:forEach var="item" items="${bbsArticleList}">
			<li>
				<h4>
					<a href="javascript:showBbsTopic('${item.bbsArticle.id}','${item.bbsArticle.columnId}');">${item.bbsArticle.title}</a>
					<c:if test="${item.bbsArticle.hasAttach=='Y'}"><img src="/images/a32.gif" border="0"></c:if>
				</h4>
				<p><commonTag:clearHtml source="${item.bbsArticle.content}" subLength="100" lineFeed="false" moreString="..." /></p>
				<c:if test="${item.bbsArticle.replierId!=0}"><span>最后回复：${item.bbsArticle.replierName} <fmt:formatDate value="${item.bbsArticle.lastTime}" pattern="yyyy-MM-dd HH:mm"/></span><br></c:if>
				<span>分类：${item.columnName} | 发布者：${item.bbsArticle.createrName} | 时间：<fmt:formatDate value="${item.bbsArticle.createTime}" pattern="yyyy-MM-dd"/></span>
			</li>
			</c:forEach>
		</ul>
		</MARQUEE>
	</div>
	<div class="news-info-main">
		<div class="title">
			<a href="javascript:showWin(1024,600,'/message/Main.ihtm');">更多...</a>
			<a>&nbsp;&nbsp;</a>
			<a href="javascript:showWin(1024,600,'/message/Main.ihtm?default_url=MessageNew.ihtm');">发消息</a>
			<a href="javascript:refreshWin();"><img src="/images/refresh.gif" border="0"></a>
			<h3>最新消息</h3>
		</div>
		<MARQUEE scrollAmount=2 direction=up height=200 width="100%" ONMOUSEOUT="this.start();" ONMOUSEOVER="this.stop();">
		<ul>
			<c:forEach var="item" items="${messageList}">
			<li>
				<h4>
					<a href="javascript:showMessageInfo('${item[0].id}');">${item[0].title}</a>
					<c:if test="${item[0].hasAttach=='Y'}"><img src="/images/a32.gif" border="0"></c:if>
				</h4>
				<p><commonTag:clearHtml source="${item[0].content}" subLength="100" lineFeed="false" moreString="..." /></p>
				<span>发件人：${item[0].senderName} | 时间:<fmt:formatDate value="${item[0].sendTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span>
			</li>
			</c:forEach>
		</ul>
		</MARQUEE>
		<div class="title" title="">
			<a href="javascript:showWin(1024,600,'/base/EstablishmentCommunicateSearchResult.ihtm');">更多...</a>
			<a>&nbsp;&nbsp;</a>
			<a href="javascript:doCommNew();">新增日程</a>
			<a href="javascript:refreshWin();"><img src="/images/refresh.gif" border="0"></a>
			<h3>待办事宜<span style="font-weight:normal;font-size:12px;color:#777;"> 未完成的计划，红色表示他人分派</span></h3>
		</div>
		<ul>
			<c:forEach var="item" items="${willDoList}">
			<li>
				<p>
					<span <c:if test="${item.createrId!=currentUser.user.stafferId}">style="color:red"</c:if>>[<fmt:formatDate value="${item.communicateTime}" pattern="yyyy-MM-dd"/>]</span>&nbsp;<a href="javascript:showComm(${item.id});">${item.title}</a>
				</p>
			</li>
			</c:forEach>
		</ul>
	</div>
</div>
<%@ include file="./inc/PopMsg.jsp"%>
</body>
</html>